Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enable metal_reserved_ip_block to create VRF IP reservations #233

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

ctreatma
Copy link
Contributor

@ctreatma ctreatma commented Oct 3, 2024

This fixes a couple problems with the parameter definitions for the reserved IP block module:

  1. The cidr and network parameters, needed for VRF IP reservations, were not defined in the module spec
  2. The quantity parameter, which is unsupported for VRF IP reservations, was required in order to create any IP reservation

This PR updates the reserved IP block module so that it can be used to create a VRF IP reservation. The docs are also updated to reference the cidr and network parameters.

This was broken out of #232.

required_if=[
['type', 'vrf', ['vrf_id', 'cidr', 'network']],
['type', 'public_ipv4', ['metro']]
['type', 'public_ipv4', ['quantity', 'metro']],
['type', 'private_ipv4', ['quantity']],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't we also need metro for private_ipv4? (not sure that this is a generally consumable request type, so perhaps it is moot)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible, but this PR isn't a broad fix for all possible parameter validation in the metal_reserved_ip_block module; it's focused narrowly on fixing some validation that made the module completely unusable for VRF IP reservations. Adding the quantity requirement here and for global blocks maintains the previous validation behavior for those types while allowing VRF blocks to implement the correct validation.

Copy link
Contributor

@cprivitere cprivitere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ctreatma ctreatma changed the title fix: update parameter definitions for reserved IP blocks fix: enable metal_reserved_ip_block to create VRF IP reservations Oct 4, 2024
@ctreatma ctreatma merged commit d31f17a into main Oct 4, 2024
5 checks passed
@ctreatma ctreatma deleted the fix_ip_block branch October 4, 2024 20:58
Copy link

github-actions bot commented Oct 9, 2024

This PR is included in version 0.11.0 🎉

1 similar comment
Copy link

github-actions bot commented Oct 9, 2024

This PR is included in version 0.11.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants